::@echo off
CHCP 65001

:: 检查并启动 ChatBusinessWorker
tasklist /FI "IMAGENAME eq php.exe" /FI "WINDOWTITLE eq ChatBusinessWorker" | find /I "php.exe" >nul
if errorlevel 1 (
    start "ChatBusinessWorker" cmd /k "php think ChatBusinessWorker"
)

:: 检查并启动 ChatGateway
tasklist /FI "IMAGENAME eq php.exe" /FI "WINDOWTITLE eq ChatGateway" | find /I "php.exe" >nul
if errorlevel 1 (
    start "ChatGateway" cmd /k "php think ChatGateway"
)

:: 检查并启动 ChatRegister
tasklist /FI "IMAGENAME eq php.exe" /FI "WINDOWTITLE eq ChatRegister" | find /I "php.exe" >nul
if errorlevel 1 (
    start "ChatRegister" cmd /k "php think ChatRegister"
)
